﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="it_security_project.Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form runat="server">
<br />
<div class="left">
<asp:Label ID="Label1" runat="server" Text="Change Password or Email"></asp:Label>
</div>
<br />
<div class="left">
<asp:Label ID="Label2" runat="server" Text="Password:"></asp:Label>
</div>
<div class="right">
<asp:TextBox ID="TextboxPassword" runat="server" TextMode="Password">Password</asp:TextBox>
</div>
<div class="left">
<asp:Label ID="Label3" runat="server" Text="Repeat Password:"></asp:Label>
</div>
<div class="right">
<asp:TextBox ID="TextboxRepeatPassword" runat="server" TextMode="Password">Repeat Password</asp:TextBox>
</div>
<div class="left">
<asp:Label ID="Label4" runat="server" Text="Email:"></asp:Label>
</div>
<div class="right">
<asp:TextBox ID="TextboxEmail" runat="server">Email</asp:TextBox>
</div>
<div class="left">
<asp:Label ID="Label5" runat="server" Text="Repeat Email:"></asp:Label>
</div>
<div class="right">
<asp:TextBox ID="TextboxEmailRepeat" runat="server">Repeat Email</asp:TextBox>
</div>
<div class="left">
<asp:Button ID="ButtonChangeInformation" runat="server" Text="Change" onclick="ButtonChangeInformation_Click" />
</div>
<div class="right">
<h2><asp:Label ID="threadsheader" runat="server" Text="Your Threads:"></asp:Label></h2>
</div>
<asp:ObjectDataSource ID="ProfileObjectDataSource" runat="server" TypeName="it_security_project.App_Code.BusinessLogicLayer.Service"
SelectMethod="GetThreadsByUsername" DeleteMethod="DeleteThread">
    <SelectParameters>
        <asp:SessionParameter DefaultValue="null" Name="username" 
            SessionField="NameOfUser" />
    </SelectParameters>
    
    </asp:ObjectDataSource>

<asp:ListView runat="server" ID="ProfileListView" DataSourceID="ProfileObjectDataSource">
    <ItemTemplate>
            <asp:ValidationSummary ID="ValidationSummary1" CssClass="successmessage" runat="server" ValidationGroup="successmessage" />
            <asp:ValidationSummary ID="ValidationSummary2" CssClass="validationcolor" runat="server" ValidationGroup="errormessage" />
            <div class="profileleft">
             <asp:HyperLink ID="ThreadLinkButton" runat="server" Text='<%# Bind("Title") %>' CausesValidation="false"
             NavigateUrl='<%# Eval("ThreadID", "~/ForumThread.aspx?thread={0}")%>'></asp:HyperLink>
            </div>
            <div class="profileright">
             <asp:HyperLink ID="HyperLink1" runat="server"  Text="Delete" CausesValidation="false"
             NavigateUrl='<%# Eval("ThreadID", "~/Profile.aspx?deleteThread={0}")%>' style="color:Red"></asp:HyperLink>
            </div>
    </ItemTemplate>
</asp:ListView>
</form>
</asp:Content>
